package com.dnxh.service;

import cn.hutool.db.handler.StringHandler;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dnxh.constant.CustomResult;
import com.dnxh.entity.Account;
import com.dnxh.entity.request.CreateAccountRequest;
import com.dnxh.entity.request.ModifyPassRequest;
import com.dnxh.entity.request.SearchAdminRequest;

import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zhiqiu
 * @since 2022 -04-06
 */
public interface AccountService extends IService<Account> {
	
	/**
	 * 根据用户名查询角色
	 *
	 * @param userName 用户名
	 * @return the set
	 */
	Account selectRoleByUserName(String userName);
	
	/**
	 * 校验用户名及密码
	 *
	 * @param userName the user name
	 * @param password the password
	 * @return the boolean
	 */
	boolean verify(String userName,String password);
	
	/**
	 * Add account string.
	 *
	 * @param request the request
	 * @return the string
	 */
	CustomResult addAccount (CreateAccountRequest request);
	
	/**
	 * Search custom result.
	 *
	 * @param request the request
	 * @return the custom result
	 */
	CustomResult search (SearchAdminRequest request);
	
	/**
	 * Delete account custom result.
	 *
	 * @param id the id
	 * @return the custom result
	 */
	CustomResult deleteAccount (Long id);
	
	/**
	 * Modify password custom result.
	 *
	 * @param request the request
	 * @return the custom result
	 */
	CustomResult modifyPassword (ModifyPassRequest request);
	
	/**
	 * Add department custom result.
	 *
	 * @param department the department
	 * @return the custom result
	 */
	CustomResult addDepartment (String department);
	
	/**
	 * Delete department custom result.
	 *
	 * @param id the id
	 * @return the custom result
	 */
	CustomResult deleteDepartment (Long id);
}
